using System.Web.Mvc;
using Ninject.Conditions;
using Ninject.Core;
using NinjectMVC.Controllers;

namespace NinjectMVC.Modules
{
    internal class ControllerModule : StandardModule
    {
        public override void Load()
        {
            Bind<IController>().To<HomeController>()
                .Only(When.Context.Variable("controllerName")
                    .EqualTo("Home"));
            Bind<IController>().To<MathController>()
                .Only(When.Context.Variable("controllerName")
                    .EqualTo("Math"));
        }
    }
}